package com.cloudwise.listener;

import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;
import javax.servlet.annotation.WebListener;

/**
 * @author ：Teacher陈（86521760@qq.com）
 * @date ：Created in 2021/2/23 16:16
 * @description：
 * @modified By：
 * @version:
 */
@WebListener
public class SecondListener  implements ServletContextAttributeListener {
    @Override
    public void attributeAdded(ServletContextAttributeEvent servletContextAttributeEvent) {
        System.out.println("添加属性");
        System.out.println("属性名"+servletContextAttributeEvent.getName());
        System.out.println("属性值"+servletContextAttributeEvent.getValue());
    }



    @Override
    public void attributeReplaced(ServletContextAttributeEvent servletContextAttributeEvent) {
        System.out.println("替换属性");
        System.out.println("属性名"+servletContextAttributeEvent.getName());
        System.out.println("属性值"+servletContextAttributeEvent.getValue());
    }
    @Override
    public void attributeRemoved(ServletContextAttributeEvent servletContextAttributeEvent) {
        System.out.println("移除属性");
        System.out.println("属性名"+servletContextAttributeEvent.getName());
        System.out.println("属性值"+servletContextAttributeEvent.getValue());
    }
}
